enter image description here

InBox ElasticSearch

Version 6.1.0

Creation date 2021-04-04

Resources

Module to index and perform searches with Elasticsearch.

Prerequisites

Framework

The following versions of the OTRS framework are supported:

  • 6.x.x

Modules

The following modules are required:

  • InBox Core 6.30.9 ou superior

Operational system

The following operating systems are required:

  • [None]

Third Party Software

The following third party software is required:

  • [None]

Installation

bin/otrs.Console.pl Admin::Package::Install /path/to/InBox\ ElasticSearch 6.1.0.opm

Configuration

This module can be configured via "System Configuration" in the administrative interface. The following configuration options are available:

Elasticsearch::Active

To enable search by Elasticsearch, enable this setting:

Image1

Frontend::ToolBarModule###250-Ticket::ElasticsearchFulltext

To activate the search field as a ToolBar, enable this setting:

Image2

Elasticsearch::IngestAttachmentFormat

File formats that are indexed:

Image3

Elasticsearch::ExcludedQueues

Tickets in the following queues will not be stored on the Elasticsearch server. To apply this to existing tickets, the ticket migration has to be run via console, after changing this option:

Image4

Elasticsearch::IngestMaxFilesize

Maximum file size for the ingest plugin:

Image5

Elasticsearch::MaxArticleSearch

Maximal number of results returned by ES per field:

Image6

Elasticsearch::TicketStoreFields

Fields stored in the ticket index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory. If fields are added which can be updated (especially DynamicFields), their respective update event has to be added to the TicketManagement invoker of the Elasticsearch webservice!

Image7

Elasticsearch::TicketSearchFields

Fields of the ticket index, used for the ticket fulltext search. Fields are also stored, but are not mandatory for the overall functionality. If fields are added which can be updated (especially DynamicFields), their respective update event has to be added to the TicketManagement invoker of the Elasticsearch webservice!

Image8

Elasticsearch::CustomerCompanyStoreFields

Fields stored in the customer company index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.

Image9

Elasticsearch::CustomerCompanySearchFields

Fields of the customer company index, used for the company fulltext search. Fields are also stored, but are not mandatory for the overall functionality.

Image10

Elasticsearch::CustomerUserStoreFields

Fields stored in the customer user index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.

Image11

Elasticsearch::CustomerUserSearchFields

Fields to be searched in ticket index. Fields are also stored, but are not mandatory for the overall functionality.

Image12

Elasticsearch::ArticleIndexCreationSettings

Number of shards (NS) and replicas (NR) for the index:

Image13

Elasticsearch::QuickSearchCreatedFormat

Format of Creation date shown for tickets. As an example '%Y-%m-%d %H:%M:%S' would be interpreted as '2020-01-22 18:07:23'. Please refer to http://search.cpan.org/~drolsky/DateTime-1.21/lib/DateTime.pm#strftime_Patterns.

Image14

Elasticsearch::QuickSearchShow###Ticket

Objects to search for, how many entries and which attributs to show. Ticket attributes, except queue, have to explicitely be stored via Elasticsearch:

Image15

Elasticsearch::QuickSearchShow###CustomerCompany

Objects to search for, how many entries and which attributs to show:

Image16

Elasticsearch::QuickSearchShow###CustomerUser

Objects to search for, how many entries and which attributs to show:

Image17

Elasticsearch::QuickSearchShow###ConfigItem

Objects to search for, how many entries and which attributs to show. ConfigItem attributes have to explicitly be stored via Elasticsearch:

Image18

Elasticsearch::DefaultOperator

Standard operator for ElasticSearch search:

Image19

Elasticsearch::AgentElasticFullSearch::Limit

Return limit for AgentElasticFullSearch module:

Image20

Swap::NavigationBar::DefaultSearch

Controls if default Action for search has to be replaced by Elasticsearch:

Image21

Daemon::SchedulerCronTaskManager::Task###ElasticSearchIndexRebuild

Rebuilds Elasticsearch indices. Can be used for example, if CustomerUsers are authenticated via ldap. Highly inefficient however, as the whole index is rebuild every time.

Image22

Elasticsearch::ExcludedCIClasses

ConfigItems of the following classes will not be stored on the Elasticsearch server. To apply this to existing CIs, the CI migration has to be run via console, after changing this option.

Image23

Elasticsearch::ExcludedCIDeploymentStates

ConfigItems with the following deployment states will not be stored on the Elasticsearch server. To apply this to existing CIs, the CI migration has to be run via console, after changing this option.

Image24

Elasticsearch::ConfigItemStoreFields

Fields stored in the configuration item index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.

Image25

Elasticsearch::ConfigItemSearchFields

Fields of the configuration item index, used for the fulltext search. Fields are also stored, but are not mandatory for the overall functionality. Inclusion of attachments can be disabled by setting the entry to 0 or deleting it.

Image26

Usage

Elasticsearch Web Service

When installing the module the webservice is created, the address of the Elasticsearch server must be configured. Go to Administration->Web Services select the Elasticsearch web service, access the configuration as a requester:

Image27

Set the Elasticsearch server endpoint:

Image28

If you want to install Elasticsearch on the CentOS 7 server, follow the procedure below.

Install Elasticsearch CentOS 7

The server you’re working on should be updated before you install ElasticSearch 7.x on CentOS 7. Just run the commands below to update it:

sudo yum -y update

Install Java

sudo yum -y install java-1.8.0-openjdk  java-1.8.0-openjdk-devel

Download RPM Elasticsearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.2-x86_64.rpm

Install RPM

rpm -ivh elasticsearch-7.9.2-x86_64.rpm

Enable and Start service Elasticsearch

systemctl enable elasticsearch.service
systemctl start elasticsearch

Indexing of tickets, customers, customer users and configuration items.

To perform indexing, enable this configuration ###Daemon::SchedulerCronTaskManager::Task###ElasticSearchIndexRebuild, or manually execute it with the command below:

bin/otrs.Console.pl Maint::Elasticsearch::Migration